#!/usr/bin/env python

import sys

if len(sys.argv) < 4:
    print "Nothing to combine."
    sys.exit()

# get headers from first file
outFile = open(sys.argv[1], 'w')

for line in open(sys.argv[2], 'r'):
    outFile.write(line)

for csv in sys.argv[3:]:
    f = open(csv, 'r')
    f.next()
    for line in f:
        outFile.write(line)
    f.close()

outFile.close()
